<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./lib/web-office-sdk-v1.1.19.umd.js"></script>
</head>
<body>
    <div class="custom-mount"></div>
    <script>
        window.onload = function() {
            const jssdk = WebOfficeSDK.config({
                url: './doc/test.pptx?_w_tokentype=1',
                mount: document.querySelector('.custom-mount'),
            });

            // 如果需要对 iframe 进行特殊的处理，可以通过以下方式拿到 iframe 的 dom 对象
            console.log(jssdk.iframe);

            // 打开文档结果
            jssdk.on('fileOpen', (data) => {
                console.log(data.success);
            });
        };
    </script>
</body>
</html>